package com.molichuxing.gateway.bff.order.entity.response;

import com.molichuxing.framework.dto.ResponseRootDto;
import com.molichuxing.services.property.OrderScheduleStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 还款计划明细vo
 * 
 * @author zoumingyu
 * @date 2019年8月24日
 *
 */
@Data
public class OrderRepaymentDetailVo extends ResponseRootDto {
	private static final long serialVersionUID = -7942109908097886137L;

	@ApiModelProperty(value = "排期id")
	private Integer id;
	
	@ApiModelProperty(value = "订单号")
	private Long orderCode;
	
	@ApiModelProperty(value = "还款期数")
	private Integer periods;

	@ApiModelProperty(value = "还款期数str")
	private String periodsStr;
	
	@ApiModelProperty(value = "总期数")
	private Integer totalPeriods;

	@ApiModelProperty(value = "金额")
	private BigDecimal payable;

	@ApiModelProperty(value = "应还款日")
	private LocalDate payableDate;

	@ApiModelProperty(value = "还款状态（0：未还款，1：已还款，2：已终止）")
	private Integer status;

	@ApiModelProperty(value = "还款状态str")
	private String statusStr;

	@ApiModelProperty(value = "还款时间")
	private LocalDateTime paySuccessTime;

	@ApiModelProperty(value = "是否逾期（0：否，1：是）")
	private Boolean isOverdue;

	@ApiModelProperty(value = "是否逾期str")
	private String isOverdueStr;

	@ApiModelProperty(value = "逾期天数")
	private Integer overdueDays;

	@ApiModelProperty(value = "逾期天数str")
	private String overdueDaysStr;

	@ApiModelProperty(value = "流水号")
	private String serialNumber;

	@ApiModelProperty(value = "支付备注")
	private String remark;

	@ApiModelProperty(value = "保证金")
	private BigDecimal deposit;

	@ApiModelProperty(value = "到账金额")
	private BigDecimal arrivalAmount;

	@ApiModelProperty(value = "到账金额str")
	private String arrivalAmountStr;

	public void setStatus(OrderScheduleStatusEnum status) {
		this.status = status == null ? null : status.getValue();
		this.statusStr = status == null ? null : status.getName();
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
}
